import {
  loadEmployees,
  delEmployee,
  addNewEmployee,
  $updateEmployee,
  loadEmployeesBySenior, $findByQuery
} from "../../../../services/settingService";

export const Employees={
  createNew:function (_acount,_name,_Pcash,_Ppurchase,_Pplan,_Pimpower,_Proot,_identity,) {
    let employee={};
    //employee.staffId=_id||'';
    employee.account=_acount||'';
    employee.name=_name||'';
    employee.Pcash=_Pcash||false;
    employee.Ppurchase=_Ppurchase||false;
    employee.Pplan=_Pplan||false;
    employee.Pimpower=_Pimpower||false;
    employee.Proot=_Proot||false;
    employee.password='';
    return employee;
  }
}
export async function getEmployees(){
  return loadEmployees();
};
export function getEmployeesBySenior(senior){
  return loadEmployeesBySenior(senior);
}
export function delByAccount(account){
  return delEmployee(account);
}
export function addEmployee(staff){
  return addNewEmployee(staff);
}
export function updateEmployee(staff){
  return $updateEmployee(staff);
}
export function findByQuery(query){
  return $findByQuery(query);
}
